package sz.szsmk.citizencard.ui.activity;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.chenenyu.router.annotation.Route;
import com.gyf.immersionbar.ImmersionBar;

import sz.szsmk.citizencard.R;
import sz.szsmk.citizencard.ui.base.IBaseActivity;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/7/26 10:14
 * description:
 */
@Route("questiondetail")
public class QuestionDetailActivity extends IBaseActivity {

    private ImageView back;
    private TextView title;

    @Override
    protected int attachLayoutRes() {
        return R.layout.quesstion_detail;
    }

    @Override
    protected void initInjector() {

    }

    @Override
    protected void initViews() {
        String qustion = getIntent().getStringExtra("qustion");
        String answer = getIntent().getStringExtra("answer");
        ImmersionBar.with(this)
                .fitsSystemWindows(true)
                .statusBarDarkFont(true, 0f)
                .statusBarColor(R.color.white).init();
        back = (ImageView) findViewById(R.id.back);
        title = (TextView) findViewById(R.id.setting_title);
        TextView mQuestion = (TextView) findViewById(R.id.question_qustion);
        TextView mAnswer = (TextView) findViewById(R.id.question_answer);
        title.setText(qustion);
        mQuestion.setText(qustion);
        mAnswer.setText(answer);
        if (qustion != null) {
            title.setText(qustion);
        }
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void updateViews() {

    }
}
